//
//  AppState.swift
//  SwiftUI-Pokemaster
//
//  Created by gree on 2020/10/9.
//

import SwiftUI

struct AppState {
    var settings = Settings()
}

extension AppState {
    struct Settings {
        enum Sorting: CaseIterable {
            case id, name, color, favorite
        }
        
        var showEnglishName = true
        var sorting = Sorting.id
        var showFavoriteOnly = false
        
        enum AccountBehavior: CaseIterable {
            case register, login
        }
        
        var accountBehavior = AccountBehavior.login
        var email = ""
        var password = ""
        var verifyPassword = ""
        var loginUser: User?
        
        var loginRequesting = false
        var loginError: MyAppError?
        
    }
}
